package jdbcmigration;

public class Column {

    private String columnName;
    private String columnType;
    private int length;
    private int Decimal;
    private boolean nullable;
    private String defaultValue;
    private boolean autoincrement;
    private boolean unicode;

    public Column() {
        columnName = null;
        columnType = "nchar";
        length = -1;
        Decimal = 0;
        nullable = true;
        defaultValue = "";
        autoincrement = false;
        unicode = false;
    }

    public Column(String columnName, String columnType) {
        this(columnName, "nchar", -1, 0, true, null, false);
    }

    public Column(String columnName,String columnType,int length,int Decimal,boolean nullable,String defaultValue,boolean autoincrement) {
        this.columnName = columnName;
        this.columnType = columnType;
        this.length = length;
        this.Decimal = Decimal;
        this.nullable = nullable;
        this.defaultValue = defaultValue;
        this.autoincrement = autoincrement;

        unicode = false;
    }

    public void setColumn(String columnName, String columnType, int length, int Decimal, boolean nullable, String defaultValue, boolean autoincrement) {
        this.columnName = columnName;
        this.columnType = columnType;
      
        this.length = length;
        this.Decimal = Decimal;
        this.nullable = nullable;
        this.defaultValue = defaultValue;
        this.autoincrement = autoincrement;
    }

    public String getColumnName() {
        return columnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public int getLength() {
        return length;
    }
    public int getDecimal()
    {
        return Decimal;
    }
    public void setLength(Integer length) {
        this.length = length;
    }

    public boolean isNullable() {
        return nullable;
    }

    public void setNullable(boolean nullable) {
        this.nullable = nullable;
    }

    public Object getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public boolean isAutoincrement() {
        return autoincrement;
    }

    public void setAutoIncrement(boolean autoincrement) {
        this.autoincrement = autoincrement;
    }

    public boolean isUnicode() {
        return unicode;
    }

    public void setUnicode(boolean unicode) {
        this.unicode = unicode;
    }
}
